package org.opens.service.impl;

import org.opens.service.CatService;
import org.springframework.stereotype.Component;

import javax.jws.WebService;

/**
 * 功能描述
 *
 * @author by zhangyuming
 * @date 2022/8/18
 */
@WebService(
        // 与接口中指定的name一致
        serviceName = "CatService",
        // 与接口中的命名空间一致,一般是接口的包名倒
        targetNamespace = "http://service.opens.org",
        // 接口地址
        endpointInterface = "org.opens.service.CatService"
)
@Component
public class CatServiceImpl implements CatService {

    @Override
    public String message(String name) {
        return "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" +
                "<response>\n" +
                "<Error_code>0</Error_code>\n" +
                "<msg>一只小猫</msg>\n" +
                "<data>\n" +
                "<DEPT_NAME>d1</DEPT_NAME>\n" +
                "<DEPT_ID>i1</DEPT_ID>\n" +
                "<DEPT_PARENT>ss1</DEPT_PARENT>\n" +
                "<DEPT_NO>11</DEPT_NO>\n" +
                "</data>\n" +
                "<data>\n" +
                "<DEPT_NAME>d1</DEPT_NAME>\n" +
                "<DEPT_ID>i1</DEPT_ID>\n" +
                "<DEPT_PARENT>ss1</DEPT_PARENT>\n" +
                "<DEPT_NO>11</DEPT_NO>\n" +
                "</data>\n" +
                "</response>";
    }

}
